package org.bean;

import java.util.ArrayList;
import java.util.List;

import org.constant.FriendConstant;

/**
 * @author : DengYing
 * @CreateDate : 2017年12月4日 下午6:07:44
 * @Description ：Please describe this document
 */
public class NotifyFriendInfo {
	private int pid;
	private List<FriendInfo> adds;
	private List<FriendInfo> updates;
	private List<FriendInfo> deletes;
	
	public NotifyFriendInfo(int pid) {
		super();
		this.pid = pid;
	}



	public void put(int type, FriendInfo info) {
		switch (type) {
		case FriendConstant.STATUS_ADD:
			if (adds==null) {
				adds = new ArrayList<>();
			}
			adds.add(info);
			break;
		case FriendConstant.STATUS_UPDATE:
			if (updates==null) {
				updates = new ArrayList<>();
			}
			updates.add(info);
			break;
		case FriendConstant.STATUS_DELETE:
			if (deletes==null) {
				deletes = new ArrayList<>();
			}
			deletes.add(info);
			break;
		default:
			break;
		}
	}
}
